//token 存储操作
// 保存  获取  删除

const TOKEN_KEY = 'TOKEN_KEY'

//保存
export const saveToken = (token)=>{
    localStorage.setItem(TOKEN_KEY,JSON.stringify(token))
}

//获取
export const getToken = ()=>{
    return JSON.parse(localStorage.getItem(TOKEN_KEY))
}

//删除
export const deleteToken = ()=>{
    localStorage.removeItem(TOKEN_KEY)
}